# 类
# 设计一个类
class Student:
    name = None
    sex = None
    age = None
# 创建对象
student = Student()
student.name = "紫嫣"
student.sex = "女"
student.age = "18"
print(student.name)

# 动态绑定属性
student1 = Student()
student1.name = "嫣然"
student1.sex = "女"
student1.age = "20"
student1.boyfriend = "ding"
print(student1.name, student1.boyfriend)
# 动态绑定方法
def fun():
    print("动态绑定方法")
student1.fun = fun
student1.fun()
